// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';
const apiPrefix = '/web';

/** 获取日报表 GET /statistic/electricity/day */
export async function statisticElectricityControllerGetDayReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGetDayReportParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultStatisticElectricityVOStatisticDayElectricity>(
    `${apiPrefix}/statistic/electricity/day`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 获取日图表 GET /statistic/electricity/day/graph */
export async function statisticElectricityControllerGenerateDayReportGraph(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGenerateDayReportGraphParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultReportTable>(`${apiPrefix}/statistic/electricity/day/graph`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 导出报表 GET /statistic/electricity/export/${param0} */
export async function statisticElectricityControllerExportReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerExportReportParams,
  options?: { [key: string]: any },
) {
  const { unit: param0, ...queryParams } = params;
  return request<any>(`${apiPrefix}/statistic/electricity/export/${param0}`, {
    method: 'GET',
    params: {
      ...queryParams,
    },
    ...(options || {}),
  });
}

/** 获取月报表 GET /statistic/electricity/month */
export async function statisticElectricityControllerGetMonthReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGetMonthReportParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultStatisticElectricityVOStatisticMonthElectricity>(
    `${apiPrefix}/statistic/electricity/month`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 获取月图表 GET /statistic/electricity/month/graph */
export async function statisticElectricityControllerGenerateMonthReportGraph(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGenerateMonthReportGraphParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultReportTable>(`${apiPrefix}/statistic/electricity/month/graph`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}

/** 获取年报表 GET /statistic/electricity/year */
export async function statisticElectricityControllerGetYearReport(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGetYearReportParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultStatisticElectricityVOStatisticYearElectricity>(
    `${apiPrefix}/statistic/electricity/year`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 获取年图表 GET /statistic/electricity/year/graph */
export async function statisticElectricityControllerGenerateYearReportGraph(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.statisticElectricityControllerGenerateYearReportGraphParams,
  options?: { [key: string]: any },
) {
  return request<API.ApiResultReportTable>(`${apiPrefix}/statistic/electricity/year/graph`, {
    method: 'GET',
    params: {
      ...params,
    },
    ...(options || {}),
  });
}
